* NOTE: You need to set the Stata working directory to the path
* where the data file is located.

set more off

clear
quietly infix                 ///
  str     year       1-4      ///
  str     regiona    5-5      ///
  str     divisiona  6-6      ///
  str     state      7-30     ///
  str     statea     31-32    ///
  str     smsaa      33-36    ///
  str     county     37-93    ///
  str     countya    94-96    ///
  str     cty_suba   97-99    ///
  str     placea     100-103  ///
  str     tracta     104-109  ///
  str     blck_grpa  110-110  ///
  str     blocka     111-113  ///
  str     edinda     114-114  ///
  str     enumdista  115-118  ///
  str     scsaa      119-120  ///
  str     urb_areaa  121-124  ///
  str     cda        125-126  ///
  str     aianhha    127-129  ///
  str     mcdseqnoa  130-133  ///
  str     zipa       134-138  ///
  str     areaname   139-198  ///
  double  c9d001     199-207  ///
  double  c9d002     208-216  ///
  double  c9d003     217-225  ///
  double  c9d004     226-234  ///
  double  c9d005     235-243  ///
  double  c9d006     244-252  ///
  double  c9d007     253-261  ///
  double  c9d008     262-270  ///
  double  c9d009     271-279  ///
  double  c9d010     280-288  ///
  double  c9d011     289-297  ///
  double  c9d012     298-306  ///
  double  c9d013     307-315  ///
  double  c9d014     316-324  ///
  double  c9d015     325-333  ///
  double  c9e001     334-342  ///
  double  c9e002     343-351  ///
  double  c9e003     352-360  ///
  double  c9e004     361-369  ///
  double  c9e005     370-378  ///
  double  c67001     379-387  ///
  double  c67002     388-396  ///
  double  c67003     397-405  ///
  double  c67004     406-414  ///
  double  c67005     415-423  ///
  double  c67006     424-432  ///
  double  c67007     433-441  ///
  double  c67008     442-450  ///
  double  c67009     451-459  ///
  double  c67010     460-468  ///
  double  c67011     469-477  ///
  double  c67012     478-486  ///
  double  c67013     487-495  ///
  double  c67014     496-504  ///
  double  c67015     505-513  ///
  double  c67016     514-522  ///
  double  c67017     523-531  ///
  double  c67018     532-540  ///
  double  c67019     541-549  ///
  double  c67020     550-558  ///
  double  c67021     559-567  ///
  double  c67022     568-576  ///
  double  c67023     577-585  ///
  double  c67024     586-594  ///
  double  c67025     595-603  ///
  double  c67026     604-612  ///
  using `"nhgis0016_ds104_1980_county.dat"'


format c9d001    %9.0f
format c9d002    %9.0f
format c9d003    %9.0f
format c9d004    %9.0f
format c9d005    %9.0f
format c9d006    %9.0f
format c9d007    %9.0f
format c9d008    %9.0f
format c9d009    %9.0f
format c9d010    %9.0f
format c9d011    %9.0f
format c9d012    %9.0f
format c9d013    %9.0f
format c9d014    %9.0f
format c9d015    %9.0f
format c9e001    %9.0f
format c9e002    %9.0f
format c9e003    %9.0f
format c9e004    %9.0f
format c9e005    %9.0f
format c67001    %9.0f
format c67002    %9.0f
format c67003    %9.0f
format c67004    %9.0f
format c67005    %9.0f
format c67006    %9.0f
format c67007    %9.0f
format c67008    %9.0f
format c67009    %9.0f
format c67010    %9.0f
format c67011    %9.0f
format c67012    %9.0f
format c67013    %9.0f
format c67014    %9.0f
format c67015    %9.0f
format c67016    %9.0f
format c67017    %9.0f
format c67018    %9.0f
format c67019    %9.0f
format c67020    %9.0f
format c67021    %9.0f
format c67022    %9.0f
format c67023    %9.0f
format c67024    %9.0f
format c67025    %9.0f
format c67026    %9.0f

label var year      `"Data File Year"'
label var regiona   `"Region Code"'
label var divisiona `"Division Code"'
label var state     `"State Name"'
label var statea    `"State Code"'
label var smsaa     `"Standard Metropolitan Statistical Area Code"'
label var county    `"County Name"'
label var countya   `"County Code"'
label var cty_suba  `"County Subdivision Code"'
label var placea    `"Place Code"'
label var tracta    `"Census Tract Code"'
label var blck_grpa `"Block Group Code"'
label var blocka    `"Block Code"'
label var edinda    `"Enumeration District Indicator Code"'
label var enumdista `"Enumeration District Code"'
label var scsaa     `"Standard Consolidated Statistical Area Code"'
label var urb_areaa `"Urban Area Code"'
label var cda       `"Congressional District Code"'
label var aianhha   `"American Indian Area/Alaska Native Area/Hawaiian Home Land Code"'
label var mcdseqnoa `"MCD Sequence Number Code"'
label var zipa      `"5-Digit Zip Code Code"'
label var areaname  `"Area Name"'
label var c9d001    `"White"'
label var c9d002    `"Black"'
label var c9d003    `"American Indian, Eskimo, and Aleut: American Indian"'
label var c9d004    `"American Indian, Eskimo, and Aleut: Eskimo"'
label var c9d005    `"American Indian, Eskimo, and Aleut: Aleut"'
label var c9d006    `"Asian and Pacific Islander: Japanese"'
label var c9d007    `"Asian and Pacific Islander: Chinese"'
label var c9d008    `"Asian and Pacific Islander: Filipino"'
label var c9d009    `"Asian and Pacific Islander: Korean"'
label var c9d010    `"Asian and Pacific Islander: Asian Indian"'
label var c9d011    `"Asian and Pacific Islander: Vietnamese"'
label var c9d012    `"Asian and Pacific Islander: Hawaiian"'
label var c9d013    `"Asian and Pacific Islander: Guamanian"'
label var c9d014    `"Asian and Pacific Islander: Samoan"'
label var c9d015    `"Other"'
label var c9e001    `"Not of Spanish origin"'
label var c9e002    `"Mexican"'
label var c9e003    `"Puerto Rican"'
label var c9e004    `"Cuban"'
label var c9e005    `"Other Spanish"'
label var c67001    `"Under 1 year"'
label var c67002    `"1-2 years"'
label var c67003    `"3-4 years"'
label var c67004    `"5 years"'
label var c67005    `"6 years"'
label var c67006    `"7-9 years"'
label var c67007    `"10-13 years"'
label var c67008    `"14 years"'
label var c67009    `"15 years"'
label var c67010    `"16 years"'
label var c67011    `"17 years"'
label var c67012    `"18 years"'
label var c67013    `"19 years"'
label var c67014    `"20 years"'
label var c67015    `"21 years"'
label var c67016    `"22-24 years"'
label var c67017    `"25-29 years"'
label var c67018    `"30-34 years"'
label var c67019    `"35-44 years"'
label var c67020    `"45-54 years"'
label var c67021    `"55-59 years"'
label var c67022    `"60-61 years"'
label var c67023    `"62-64 years"'
label var c67024    `"65-74 years"'
label var c67025    `"75-84 years"'
label var c67026    `"85 years and over"'


